package com.plugie.superrbt;

import android.widget.TabHost;
import android.os.Bundle;
import android.widget.TabHost.TabSpec;

public class SuperRbtCatalogActivity extends SuperRbtActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.catalog);
        // Set up the tabs
        TabHost host = (TabHost) findViewById(R.id.TabHost1);
        host.setup();
        
        // New Rbt Tab
        TabSpec newRbtTab = host.newTabSpec("newRbtTab");
        newRbtTab.setIndicator(getResources().getString(R.string.new_rbt), getResources().getDrawable(
                android.R.drawable.star_on));

        newRbtTab.setContent(R.id.ScrollViewNew);
        host.addTab(newRbtTab);

        // Top  tab
        TabSpec topRbtTab = host.newTabSpec("topRbtTab");
        topRbtTab.setIndicator(getResources().getString(R.string.top_rbt), getResources().getDrawable(
                android.R.drawable.star_on));
        topRbtTab.setContent(R.id.ScrollViewTop);
        host.addTab(topRbtTab);
        
        // Search  tab
        TabSpec searchRbtTab = host.newTabSpec("searchRbtTab");
        searchRbtTab.setIndicator(getResources().getString(R.string.search_rbt), getResources().getDrawable(
                android.R.drawable.star_on));
        searchRbtTab.setContent(R.id.ScrollViewSearch);
        host.addTab(searchRbtTab);
        
        // Others  tab
        TabSpec othersRbtTab = host.newTabSpec("othersRbtTab");
        othersRbtTab.setIndicator(getResources().getString(R.string.others_rbt), getResources().getDrawable(
                android.R.drawable.star_on));
        othersRbtTab.setContent(R.id.ScrollViewOthers);
        host.addTab(othersRbtTab);
        
     // Set the default tab
        host.setCurrentTabByTag("newRbtTab");
    }
}